package com.zhiyou.app.shop.common;
/**
 * 此类用于异常信息国际化,action中会根据messageKey找到资源文件中的提示信息
 * @author zhangkeweigy
 *
 */
public class AycshopException extends RuntimeException {
	
	private static final long serialVersionUID = 1L;
	
	private String[] params;
	
	public AycshopException(){
		super();
	}
	/**默认请使用此构造函数**/
	public AycshopException(String messageKey) {
		super(messageKey);
	}
	
	/**
	 * 需要传递参数的异常
	 * @param messageKey
	 * @param params 填补messageKey中的占位符
	 */
	public AycshopException(String messageKey,String[] params) {
		super(messageKey);
		this.params = params;
	}
	
	public AycshopException(Throwable cause){
		super(cause);
	}
	
	public AycshopException(String message, Throwable cause){
		super(message, cause);
	}
	
	public String[] getParams() {
		return params;
	}
	
}
